from abc import ABC, abstractmethod
from .data_models import ImageAnalysisResult

class ImageProcessor(ABC):
    @abstractmethod
    def analyze_image(self, image_path: str) -> ImageAnalysisResult:
        pass

class OpenAIImageProcessor(ImageProcessor):
    def __init__(self, client):
        self.client = client
    
    def analyze_image(self, image_path: str) -> ImageAnalysisResult:
        from .image_utils import process_image
        analysis = process_image(image_path, self.client)
        return ImageAnalysisResult(image_path, analysis)